package com.gzhryc.shared_device.base.enums;

/**
 * 钱包操作相互的枚举
 * @version 2022-09-19
 */
public class WalletOperateEnum {

    public static enum Type {

        Add(1, "增加"), Reduce(2, "减少"), Transfer(3, "转存"), Restitution(4,"转入");

        private Integer index;
        private String note;

        Type(Integer index, String note) {
            this.index = index;
            this.note = note;
        }

        public Integer index() {
            return index;
        }

        public String note() {
            return note;
        }

        public static String note(Integer index) {
            Type[] temp = Type.values();
            for (int i = 0; i < temp.length; i++) {
                Type item = temp[i];
                if (item.index.equals(index)) {
                    return item.note;
                }
            }
            return null;
        }
    }

    public static enum MoneyType {

        Money(1, "余额"), FreezeMoney(2, "冻结余额"), VirtualMoney(3, "虚拟币")
        , DebtMoney(4, "欠款"), WithdrawalMoney(5, "提现金额");

        private Integer index;
        private String note;

        MoneyType(Integer index, String note) {
            this.index = index;
            this.note = note;
        }

        public Integer index() {
            return index;
        }

        public String note() {
            return note;
        }

        public static String note(Integer index) {
            MoneyType[] temp = MoneyType.values();
            for (int i = 0; i < temp.length; i++) {
                MoneyType item = temp[i];
                if (item.index.equals(index)) {
                    return item.note;
                }
            }
            return null;
        }
    }
}
